#ifndef _LIST_H_
#define _LIST_H_

#include <stdlib.h>

typedef struct s_list_elem
{
    int data;
    struct s_list_elem *next;
}list_elem_t;

typedef struct s_list
{
    list_elem_t  *first;
    int size;
}list_t;

void listInit      ( list_t *list);
void listDel       ( list_t *list );

int  listPush_front( list_t *list, int  data);
int  listPop_front ( list_t *list, int *data);
int  listIterator  ( list_t *list, list_elem_t **iterator);
int  listNext      ( list_elem_t **iterator);
int  listDelElem   ( list_t *list, list_elem_t **iterator);
int  listSize      ( const list_t *list);

#endif